<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>15</title>
		<link rel="stylesheet" type="text/css" href="./css/hui.css" />
		<style type="text/css">
			body {
				background: #ffffff;
				padding: 0px;
				margin: 0px;
			}

			.title {
				width: 200px;
				height: 40px;
				line-height: 40px;
				position: absolute;
				left: 50%;
				margin-left: -100px;
				font-size: 17px;
				color: #FFFFFF;
			}

			#hui-back:before {
				color: #FFFFFF;
			}

			.hui-header {
				background: #2439A5;

			}

			.message {
				height: 145px;
				background: #2439A5;
				text-align: center;
			}

			.portrait {
				width: 50px;
				height: 50px;
				border-radius: 50%;
				border: 10px solid rgba(255, 255, 255, 0.11);
				margin-top: 26px;
			}

			.number {
				text-align: center;
				font-size: 14px;
				color: #FFFFFF;
				margin-top: 8px;
			}

			.hui-list li>a,
			.hui-list>a {
				border-bottom: 1px solid #E4E3E6;
			}

			.hui-list-text {
				border-bottom: none;
			}

			.hui-list {
				border-bottom: none;
			}

			.btn {
				height: 47px;
				line-height: 47px;
				box-sizing: border-box;
				border: 1px solid rgba(36, 57, 165, 1);
				border-radius: 24px;
				color: #2439A5;
				font-size: 18px;
				text-align: center;
				position: absolute;
				left: 16px;
				right: 16px;
				bottom: 40px;
			}

			.hui-list-icons img {
				width: 17px;
			}
		</style>
	</head>

	<body>
		<header class="hui-header">
			<div id="hui-back"></div>
			<span class="title">个人中心</span>
		</header>
		<div class="hui-wrap">
			<div class="message">
				<img class="portrait" id="photo" alt="" src="./img/photo.jpeg">
				<div id="num" class="number"></div>
			</div>
			<div class="hui-list" style="margin-top:22px;">
				<a href="#" onclick="goYJFK()">
					<div class="hui-list-icons">
						<img src="./img/file-text.png" />
					</div>
					<div class="hui-list-text">
						意见反馈
						<div class="hui-list-info">
							<span class="hui-icons hui-icons-right"></span>
						</div>
					</div>
				</a>
				<a href="javascript:hui.open('17.html');">
					<div class="hui-list-icons">
						<img src="./img/setting.png" />
					</div>
					<div class="hui-list-text">
						账号设置
						<div class="hui-list-info">
							<span class="hui-icons hui-icons-right"></span>
						</div>
					</div>
				</a>
				<a href="javascript:hui.open('ys.html');">
					<div class="hui-list-icons">
						<img src="./img/audit.png" />
					</div>
					<div class="hui-list-text">
						隐私协议
						<div class="hui-list-info">
							<span class="hui-icons hui-icons-right"></span>
						</div>
					</div>
				</a>
				<a href="javascript:hui.open('18.html');">
					<div class="hui-list-icons">
						<img src="./img/earth.png" />
					</div>
					<div class="hui-list-text">
						关于我们
						<div class="hui-list-info">
							<span class="hui-icons hui-icons-right"></span>
						</div>
					</div>
				</a>
				<a href="javascript:sb();">
					<!--<a href="javascript:hui.toast('当前已经是最新版本!');">-->
					<!--<a href="http://gdown.baidu.com/data/wisegame/d2381033e8456188/QQqingliaoban_186.apk">-->
					<div class="hui-list-icons">
						<img src="./img/sync.png" />
					</div>
					<div class="hui-list-text">
						检查更新
						<div class="hui-list-info">
							<span class="hui-icons hui-icons-right"></span>
						</div>
					</div>
				</a>

			</div>
			<div onclick="back()" class="btn">退出账号</div>

		</div>
		<script src="./js/jquery.min.js"></script>
		<script src="js/fastclick.js"></script>
		<script>
			$(function() {
				FastClick.attach(document.body);
			});
		</script>
		<script src="./js/chen-url.js"></script>
		<script src="./js/hui.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			hui.ready(function() {
				hui('#num').html(localStorage.getItem("uasername"));

				// 显示用户信息
				<!--hui('#photo').attr('src', "data:image/jpg;base64," + localStorage.getItem("path"));-->
			});

			// 意见反馈单独定制
			function goYJFK() {
				nativeMethod.uploadMsg();
			}

			function sb() {
				$.ajax({
					url: address + '/apk/getAPk',
					type: 'post',
					dataType: 'json',
					processData: false,
					contentType: false,
					success: function(data) {
						if (data.code == 200) {
							if (version < data.data.version) {
								hui.confirm('<h4 style="font-size:18px;">当前有最新版本</h4></br>最新版本信息：V' + data.data.version, ['取消', '更新'],
									function() {
										window.location.href = data.data.url;
									},
									function() {});
							} else {
								hui.toast('当前已经是最新版了！')
							}
						}
					},
					error: function(XMLHttpRequest, textStatus, errorThrown) {
						if (XMLHttpRequest.readyState == 4) {
							hui.iconToast('服务器内部错误', 'warn');
							// HTTP error (can be checked by XMLHttpRequest.status and XMLHttpRequest.statusText)
						} else if (XMLHttpRequest.readyState == 0) {
							// Network error (i.e. connection refused, access denied due to CORS, etc.)
							hui.iconToast('网络异常', 'warn');
						} else {
							// something weird is happening
							hui.iconToast('服务异常', 'warn');
						}
					}
				})
			};

			function back() {
				// 登录相关
				localStorage.removeItem("uasername");
				localStorage.removeItem("password");

				// 头像
				localStorage.removeItem("path");

				localStorage.removeItem("num");
				localStorage.removeItem("id");
				localStorage.removeItem("name");

				// 个人信息
				localStorage.removeItem("idNumber");
				localStorage.removeItem("address");
				localStorage.removeItem("contry");
				localStorage.removeItem("sex");



				// 短信验证方面,自定会清楚,这里防止意外
				localStorage.removeItem("rphone");
				localStorage.removeItem("yzm");

				// 是否需要认证
				localStorage.removeItem("need");

				nativeMethod.backLogin();
				<!--hui.open('1.html');-->
			}

			function aa(path) {
				hui('#photo').attr('src', "data:image/jpg;base64," + path);
			}
		</script>
	</body>

</html>
